package admin.board.board_list.action;

import java.io.IOException;
import java.util.List;

import admin.board.board_list.dao.BoardlistDao;
import admin.board.board_list.dto.BoardlistDto;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class ListAction extends ActionSupport {
	private BoardlistDao boardlistDao;
	private List<BoardlistDto> boardlistList;
	private int selectNum;

	public ListAction() throws IOException {
		boardlistDao = BoardlistDao.getInstance();
	}

	public String execute() throws Exception {
		boardlistList = boardlistDao.list(selectNum);

		return SUCCESS;
	}

	public List<BoardlistDto> getCategoryList() {
		return boardlistList;
	}

	public int getSelectNum() {
		return selectNum;
	}

	public void setSelectNum(int selectNum) {
		this.selectNum = selectNum;
	}
}
